<#import "add_base.ftl" as add/>
<@add.html>
<#include "add_pt.ftl">

        <tr>
          <th>原付款方式</th>
          <td colspan="3"><select name="payListId" class="w2" req="原付款方式"></select></td>
        </tr>
        <tr>
          <th>新付款方式</th>
          <td colspan="3"><select name="payType" class="w2"><option value=""></option><#if payType??><#list payType as t><option value="${t.id}">${t.id} - ${t.name}</option></#list></#if></select></td>
        </tr>

<script type="text/javascript">
  function fillData(mc) {
    getJson("getPayList?saleId="+mc.saleId+"&saleType=02", function(data){
      if(data.ret) {
        fillPayType(data.data);
      } else {
        window.alert(data.msg);
      }
    });
  }
  function fillPayType(tl) {
    var sl = getEl("fm_input").payListId;
    sl.length = 0;
    for(var i=0; i<tl.length; i++) {
      sl.options.add(new Option(tl[i].payType+' - '+tl[i].payTypeName+'  '+formatMoney(tl[i].amount), tl[i].id));
    }
  }
  function clearData() {
    var fm = getEl("fm_input");
    fm.payListId.length = 0;
  }
</script>
</@add.html>